package com.bootdo.api;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

import org.apache.http.util.TextUtils;

import com.bootdo.api.domain.OfflineBody;
import com.bootdo.api.upload.RealNameTask;

public class TestMain {
	
	public static void main(String[] args) {
		String key = "A545641742003515152467180684159A";
		String key1 = "123456654321";
		
		byte[] raw = hexStr2Bytes(key1);
		for(int i = 0; i < raw.length; i++)
			System.out.println(raw[i]);
	}
	
	private static void update() {
		RealNameTask task = new RealNameTask();
		OfflineBody body = null;
		//task.upload(body);
		System.out.println("update");
	}
	
	/** 
     * bytes字符串转换为Byte值 
     * @param String src Byte字符串，每个Byte之间没有分隔符 
     * @return byte[] 
     */  
    public static byte[] hexStr2Bytes(String src)  
    {  
        int m=0,n=0;  
        int l=src.length()/2;  
        System.out.println(l);  
        byte[] ret = new byte[l];  
        for (int i = 0; i < l; i++)  
        {  
            m=i*2+1;  
            n=m+1;  
            ret[i] = Byte.decode("0x" + src.substring(i*2, m) + src.substring(m,n));  
        }  
        return ret;  
    }   
}
